/* browser.h
 *
 * Copyright 2007-2008 OpenMoko, Inc.
 * Authored by Tick <tick@openmoko.org>
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

#ifndef __ASSASSIN_BROWSER__H__
#define __ASSASSIN_BROWSER__H__

#include <packagekit/pk-enum.h>
#include <pkutil.h>
#include <etk/Etk.h>
#include <Evas.h>
#include <Ecore.h>
#include <gears.h>

/*
 * A browser to browse the package categories and individual packages.
 */


struct Scroll_Page * get_categories_page();
void refresh_categories_lists(void);
#define NUMBER_BUTTOM_LIST 3
struct Group_List {
    struct Scroll_Page * page[NUMBER_BUTTOM_LIST];
    struct Scroll_List * list[NUMBER_BUTTOM_LIST];
    Evas_List *sublist[NUMBER_BUTTOM_LIST];
    Etk_Tree_Row *row;
};

struct PKG_Item {
    char *packageid;
    Etk_Tree_Row *row;
};

struct Package_Detail {
    char *packageid;
    char *alias;
    Evas_Object *package_view;
    Etk_Widget  *etk_evas_obj;
    Etk_Widget  *scrolled_view;
    Etk_Widget  *embed;
    Evas_Object *description;
    Evas_Object *thumbnail;
};

struct Group_List * get_packages_list(const char *header, PkGroupEnum group, struct Group_List *GL);

struct Scroll_Page *get_package_detail_sp(Pk_Operation * pko, char *packageid, char * group_text, char * description, int size);
#endif
